Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPA-1384]: fix(chain): override apollo ID matching for chain #97

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

graham-chainlink
Copy link
Collaborator

If the chains query returns different chain with same id eg

[
                {
                    "id": "1",
                    "enabled": true,
                    "network": "aptos",
                    "__typename": "Chain"
                },
                {
                    "id": "1",
                    "enabled": true,
                    "network": "evm",
                    "__typename": "Chain"
                }
]

The default apollo client behaviour is to assume ID is always unique, but it is not the case here so things start to become confused like in the screen shot where both “1” show up for APTOS even though the UI correctly filters it.

The fix is to tell apollo client how to handle the uniqueness of the chain object.

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1384

Screenshot 2024-12-05 at 4 27 45 PM

@graham-chainlink graham-chainlink force-pushed the ggoh/DPA-1384/apollo-cache-fix branch from 8a98d3f to 4e47959 Compare December 6, 2024 14:01
@graham-chainlink graham-chainlink changed the title fix(chain): override apollo ID matching for chain [DPA-1384]: fix(chain): override apollo ID matching for chain Dec 6, 2024
If the chains query returns different chain with same id eg
```
[
                {
                    "id": "1",
                    "enabled": true,
                    "network": "aptos",
                    "__typename": "Chain"
                },
                {
                    "id": "1",
                    "enabled": true,
                    "network": "evm",
                    "__typename": "Chain"
                }
]
```

The default apollo client behaviour is to assume ID is always unique, but it is not the case here so things start to become confused like in the screen shot where both “1” show up for APTOS even though the UI correctly filters it.

The fix is to tell apollo client how to handle the uniqueness of the chain object.

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1384
@graham-chainlink graham-chainlink force-pushed the ggoh/DPA-1384/apollo-cache-fix branch from 4e47959 to 8486276 Compare December 9, 2024 01:29
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

@graham-chainlink graham-chainlink merged commit 445b190 into main Dec 10, 2024
6 of 7 checks passed
@graham-chainlink graham-chainlink deleted the ggoh/DPA-1384/apollo-cache-fix branch December 10, 2024 01:29
graham-chainlink added a commit to smartcontractkit/chainlink that referenced this pull request Dec 10, 2024
There was an issue raised [here](https://chainlink-core.slack.com/archives/C06NF17JK9N/p1733437678773739?thread_ts=1733412322.287769&cid=C06NF17JK9N) impacting the chain config dialog of the operator ui, because the chain id is no longer unique now that we work with multichain, we need to handle it better by considering the network and chain id together instead of just chainid.

Context: smartcontractkit/operator-ui#97

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1384
github-merge-queue bot pushed a commit to smartcontractkit/chainlink that referenced this pull request Dec 10, 2024
There was an issue raised [here](https://chainlink-core.slack.com/archives/C06NF17JK9N/p1733437678773739?thread_ts=1733412322.287769&cid=C06NF17JK9N) impacting the chain config dialog of the operator ui, because the chain id is no longer unique now that we work with multichain, we need to handle it better by considering the network and chain id together instead of just chainid.

Context: smartcontractkit/operator-ui#97

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1384
archseer pushed a commit to smartcontractkit/chainlink that referenced this pull request Dec 10, 2024
There was an issue raised [here](https://chainlink-core.slack.com/archives/C06NF17JK9N/p1733437678773739?thread_ts=1733412322.287769&cid=C06NF17JK9N) impacting the chain config dialog of the operator ui, because the chain id is no longer unique now that we work with multichain, we need to handle it better by considering the network and chain id together instead of just chainid.

Context: smartcontractkit/operator-ui#97

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1384
archseer pushed a commit to smartcontractkit/chainlink that referenced this pull request Dec 11, 2024
There was an issue raised [here](https://chainlink-core.slack.com/archives/C06NF17JK9N/p1733437678773739?thread_ts=1733412322.287769&cid=C06NF17JK9N) impacting the chain config dialog of the operator ui, because the chain id is no longer unique now that we work with multichain, we need to handle it better by considering the network and chain id together instead of just chainid.

Context: smartcontractkit/operator-ui#97

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants